<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>计算器-form表单提交</title>
</head>
<body>
    <!-- 使用的方法是get方法，action后的参数是servlet中的注解的地址 -->
    <form method="get" action="calculator_form">
        <div style="margin-top:50Px;margin-left:40%">
            <h2>计算器</h2>
            <!-- 注意：id是给js用的，name是form表单提交时给后端用得，等于后端的key值-->
            数值1: <input id="num1" name = "num1"><p></p>
            数值2: <input id="num2" name = "num2"><p></p>
            <!-- submit是给form表单用的,ajax用button-->
            <input type = "submit" value="相加">
        </div>
    </form>
</body>
</html>


